package collection;

import java.util.ArrayList;
import java.util.Collection;

/**
 * 集合泛型演示
 *
 */
public class GenericDemo {
    public static void main(String[] args) {
        Collection<String> c=new ArrayList<>();
        c.add("One");
        Collection<Integer> b=new ArrayList<>();
        b.add(9);//自动装箱了，相当于b.add(Integer.valueOf(9));


    }
}
